<template>
  <div @click="divBtn">
    <h2>
      Home {{ name }} - {{ age }}
      <button @click="counter++">{{ counter }}</button>
    </h2>
  </div>
</template>

<script>
export default {
  name: 'home',
  props: {
    name: {
      type: String,
      default: "",
    },
    age: {
      type: Number,
      default: 0,
    },
  },
  emits: ["pagesClick"],
  data() {
    return {
      counter: 0,
    };
  },
  methods: {
    divBtn() {
      this.$emit("pagesClick");
    },
  },
};
</script>

<style scoped>
</style>